/*
 * RatingComboBoxModel.java
 *
 * Created on 30 de enero de 2008, 06:37 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package prototipo;

import java.util.ArrayList;
import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;

/**
 *
 * @author Billy
 */
public class RatingComboBoxModel extends AbstractListModel implements ComboBoxModel{
    
    /** Creates a new instance of RatingComboBoxModel */
    public RatingComboBoxModel() {
    }

  private Object selectedItem;
  private ArrayList<Integer> anArrayList;

  public RatingComboBoxModel(ArrayList<Integer> arrayList) {
    anArrayList = arrayList;
  }

  public Object getSelectedItem() {
    return selectedItem;
  }

  public void setSelectedItem(Object newValue) {
    selectedItem = newValue;
  }

  public int getSize() {
    return anArrayList.size();
  }

  public Integer getElementAt(int i) {
    return anArrayList.get(i);
  }    
}
